<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Starts a transaction</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="stomp.ack.html">Stomp::ack</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="stomp.commit.html">Stomp::commit</a></div>
 <div class="up"><a href="class.stomp.html">Stomp</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="stomp.begin" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Stomp::begin</h1>
  <h1 class="refname">stomp_begin</h1>
  <p class="verinfo">(PECL stomp &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">Stomp::begin</span> -- <span class="refname">stomp_begin</span> &mdash; <span class="dc-title">Starts a transaction</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-stomp.begin-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格 (method):</p>
   <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>Stomp::begin</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$transaction_id</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
   ] )</div>

  <p class="para rdfs-comment">过程化风格:</p>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>stomp_begin</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$link</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$transaction_id</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   Starts a transaction.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-stomp.begin-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    <dt>
<em><code class="parameter">link</code></em></dt>
<dd>
<p class="para">仅对过程化样式：由 <span class="function"><a href="stomp.construct.html" class="function">stomp_connect()</a></span> 返回的 stomp 连接标识符。</p></dd>

    
     <dt>
<em><code class="parameter">transaction_id</code></em></dt>

     <dd>

      <p class="para">
       The transaction id.     
      </p>
     </dd>

    
    <dt>
<em><code class="parameter">headers</code></em></dt>
<dd>
<p class="para">关联数组包含附加的头信息（例如： receipt）。</p></dd>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-stomp.begin-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-stomp.begin-notes">
  <h3 class="title">注释</h3>
  <div class="tip"><strong class="tip">Tip</strong><p class="simpara">Stomp is inherently asynchronous. Synchronous communication can be implemented adding a receipt header. This will cause methods to not return anything until the server has acknowledged receipt of the message or until read timeout was reached.</p></div>
 </div>


 <div class="refsect1 examples" id="refsect1-stomp.begin-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   See <span class="function"><a href="stomp.commit.html" class="function">stomp_commit()</a></span> or <span class="function"><a href="stomp.abort.html" class="function">stomp_abort()</a></span>.
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="stomp.ack.html">Stomp::ack</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="stomp.commit.html">Stomp::commit</a></div>
 <div class="up"><a href="class.stomp.html">Stomp</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
